
///
/// operator.dart
///

class Vector {
  num x, y;
  Vector(this.x, this.y);
  Vector operator +(Vector v) => Vector(x + v.x, y + v.y);
  ///
  /// [Object]
  ///
  @override
  bool operator ==(dynamic other) => x == other.x && y == other.y;

  @override
  int get hashCode => x.hashCode + y.hashCode;
}

void main() {
  final z = Vector(3, 3);
  final x = Vector(1, 1);
  final y = Vector(2, 2);
  print(z == (x + y));
}
